//
//  TKBaseViewController.m
//  BasketBallLeagues
//
//  Created by kenshin on 5/1/17.
//  Copyright © 2017 kenshin. All rights reserved.
//

#import "TKBaseViewController.h"

@interface TKBaseViewController ()

@end

@implementation TKBaseViewController

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [BLColorConfig backgroundColor];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

// 是否可右滑返回
- (void)navigationCanDragBack:(BOOL)bCanDragBack
{
    if (self.navigationController)
    {
        self.navigationController.interactivePopGestureRecognizer.enabled = bCanDragBack;
    }else{}
}

#pragma mark - 多方向问题
// ios 6.0 之前
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
    return toInterfaceOrientation == UIInterfaceOrientationPortrait;
}

// ios 6.0 之后
- (BOOL)shouldAutorotate{
    return NO;
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskPortrait;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
    return UIInterfaceOrientationPortrait;
}


@end
